#ifndef __CAN_DRIVER_H
#define __CAN_DRIVER_H

#include <stdint.h>
#include <boost/shared_ptr.hpp>
#include <boost/make_shared.hpp>
#include <boost/thread.hpp>
#include "ICANCmd.h"

class CanDriver{

private:
    CAN_InitConfig _cfg;
    uint16_t HANDLE;

public:
    bool ready;

public:
    static CanDriver* get(){
        static CanDriver cd;
        return &cd;
    }

    uint16_t get_handle(){
        return this->HANDLE;
    }

    bool init();
    bool init(uint16_t baudrate);
    void set_baudrate(uint16_t baudrate);
    bool set_terminal_resistor();
    void de_init();

private:
    CanDriver();
};

#endif